<template>
	<view class="container">
		<view class="container-c">
			<view class="addressinfo">
				<text class="left">收件人</text>
				<input class="right" type="text" placeholder="请输入收件人姓名" />
			</view>
			<view class="addressinfo">
				<text class="left">电话号码</text>
				<input class="right" type="text" placeholder="请输入收件人电话号码" />
			</view>
			<view class="addressinfo">
				<text class="left">所在地区</text>
				<text class="right" @tap="openAddress">请点击选择地址</text>
			</view>
			<view class="addressinfo">
				<text class="left">详细地址</text>
				<input class="right" type="text" placeholder="输入详细地址" value="" />
			</view>
			<view class="addressinfo switch">
				<text class="left">设为默认地址</text>
				<switch checked @change="switch1Change" color="rgb(53, 78, 68)" />
			</view>
			<view class="del" @tap="delAddress">
				删除地址
			</view>
		</view>
		
		<simple-address ref="simpleAddress" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onConfirm"
			themeColor="#007AFF"></simple-address>
	
	</view>
</template>

<script>
	import {delAddressInfo} from "@/api/list/address/index.js"
	export default {
		data() {
			return {
				addressid:""
			};
		},
		onLoad(e) {
			console.log(e)
			this.addressid=e.id
		},
		methods:{
			
			delAddress(){
				delAddressInfo(this.addressid).then(res=>{
					
				})
			}
			
		}
	}
</script>

<style lang="scss" scoped>
.container {
		width: 100%;
		background-color: #f1ece7;
		height: 100vh;
	}

	.container-c {
		width: 650rpx;
		margin: 0 auto;
	}

	.addressinfo {
		display: flex;
		align-items: center;
		height: 120rpx;
		line-height: 120rpx;
		border-bottom: 2rpx solid #ccc;
		font-size: 30rpx;
		color: #000;

		.left {
			width: 35%;
		}

		.right {
			width: 65%;
		}
	}
	.addressinfo.switch{
		display: flex;
		justify-content: space-between;
	}
	.del{
		width: 70%;
		    height: 80rpx;
		    border-radius: 80rpx;
		    background-color: red;
		    color: #fff;
		    line-height: 80rpx;
			text-align: center;
		    font-size: 30rpx;
			margin:500rpx auto;
	}
</style>
